package com.ddwl.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author wenbin
 * 物流
 */
public interface LogisticsEnum {


    /**
     * 快递公司
     */
    @AllArgsConstructor
    @Getter
    enum LogisticsList {
        SHUNFENG("shunfeng", "顺丰速运"),
        YUANTONG("yuantong", "圆通速递"),
        SHENTONG( "shentong", "申通快递"),
        YUNDA( "yunda", "韵达快递"),
        ZHONGTONG( "zhongtong", "中通快递"),
        HUITONGKUAIDI( "huitongkuaidi", "百世快递"),
        YOUZHENGGUONEI( "youzhengguonei", "邮政快递包裹"),
        TIANTIAN( "tiantian", "天天快递"),
        EMS( "ems", "EMS"),
        JD( "jd", "京东物流"),
        AMCNORDER( "amcnorder", "amazon-国内订单"),
        DEBANGKUAIDI( "debangkuaidi", "德邦快递"),
        YOUSHUWULIU( "youshuwuliu", "优速快递"),
        SUNING( "suning", "苏宁物流"),
        ;
        private String code;
        private String name;

        // 根据code获取名称
        public static String getValueByCode(String code) {
            for (LogisticsList t : LogisticsList.values()) {
                if (t.getCode().equals(code)) {
                    return t.getName();
                }
            }
            return null;
        }
    }


}
